Complicated pieces of hardware typically comprise millions of transistors. Logic designers typically utilize computer-aided design programs to aid their design process. Once a designer has finished the conceptual design of a circuit, there are many optimizations which can be made.
For example, for low power design, it is often useful to add logic elements to keep elements from operating when they are not needed.
For example, flip-flops are controlled by clocks. When the clock signal goes high, the flip-flop puts out a value calculated from its inputs. It will do so, irrespective of whether or not the inputs have changed. A logic designer, when coming to determine how to minimize the power consumption of his circuit, may review the activities of the flip-flops and may “gate” those which he knows will not change value given a particular situation. To do so, the designer may add circuitry to disconnect the clock input to the flip-flop. Thus, the flip-flop will maintain its output until the clock input is returned.
The following articles discuss automatic clock-gating methods:
L. Benini, G. De Micheli, E. Macii, M. Poncino, R. Scarsi, “Symbolic Synthesis of Clock-Gating Logic for Power Optimization of Control-Oriented Synchronous Networks”, 1997 European Design and Test Conference;
T. Lang, E. Musoll, J. Cortadella, “Individual Flip-Flops with Gated Clocks for Low Power Datapaths”, EEE Transactions on Circuits and Systems—II: Analog and Digital Signal Processing, Vol. 44, No. 6, June 1997; and
F. Theeuwen, E. Seelen, “Power Reduction through Clock Gating by Symbolic Manipulation”, Proc. IFIP Int. Workshop on Logic and Architecture Synthesis, 1996; and
N. Raghavan, V. Akella, S. Bakshi, “Automatic Insertion of Gated Clocks at Register Transfer Level”, Proc. Twelth International Conference on VLSI Design, 1999.
Another optimization involves simplifying the layout of the circuit. Since there are so many circuit elements and all have to be connected in the appropriate ways to each other, simplifying the layout may improve the circuit. One complicating element in a layout is a feedback loop, where the output of some element, typically a flip-flop, is utilized by the logic eventually feeding into the element.
Reference is now made to FIG. 1, which illustrates a simple circuit 10. Circuit 10 includes a multiplexer 12 and a flip-flop 14. Flip-flop 14 receives two inputs, a clock input CLK and a data input D generated by multiplexer 12 and provided along a wire 19. When clock signal CLK rises, flip-flop 14 latches the value of D to generate a latched output Q. Output Q is fed back into multiplexer 12 (generating a feedback loop 16). Multiplexer 12 chooses between two inputs, the output I of some function, indicated by a cloud 18, of inputs A, B, C and output Q of flip-flop 14, as a function of the state of an enable signal EN. The logic for circuit 10 may be written as: if (CLK=1 and EN=1): then I, else Q.
It is known that circuit 10 can be replaced by a simpler circuit 20, shown in FIG. 2 to which reference is now made, formed of a flip-flop 24 and a gate 22 generating the clocking signal to flip-flop 24. Gate 22 ANDs together enable signal EN and clock signal CLK, thereby activating flip-flop 24 to latch signal I only when enable signal EN is positive. The logic for circuit 20 may also be written as: if (CLK=1 and EN=1): then I, else Q.
It will be appreciated that circuit 20 is a clock-gated circuit. Flip-flop 24 only receives clock signal CLK when the enable signal EN allows it. This may provide some power reduction as flip-flop 24 is not active at every tick of clock signal CLK.
It will be appreciated that the layout of circuit 10 is more complicated than that of circuit 20, due to feedback loop 16. As a result, flip-flop 14 should be located relatively close to multiplexer 12, in order to minimize the length of wire 19 and feedback loop 16. In contrast, circuit 20 is simpler to layout, since only the wire, labeled 23, between gate 22 and flip-flop 24 need be considered. Furthermore, when designing an entire chip (rather than a chip fragment as shown in FIGS. 1 and 2), wires are not allowed to cross. If two wires cross on paper, then in the actual chip, one must go over or under the other. They cannot be in the same metal layer. By eliminating feedback loop 16 of circuit 10, there is one less wire to consider and less crossing to worry about.
Unfortunately, simple cases like circuit 10 are not commonly found. A logic designer may manually review the entire design to find feedback loops to eliminate; however, such a review is difficult and the benefit (the elimination of a single feedback loop) is not large, and thus, a logic designer will remove a feedback loop only when he sees an obvious one.